package com.yitiao.jvm;

import java.util.ArrayList;
import java.util.List;

public class TestMemory {
    private final Byte[] b=new Byte[1024*512];
    public static void main(String[] args) {
        List<TestMemory> list = new ArrayList<>();
        int num=0;
//        try {
//            while (true){
//                list.add(new TestMemory());
//                num++;
//            }
//        }catch (Throwable e){
//            System.out.println("num="+num);
//            e.printStackTrace();
//        }
        System.out.println(Runtime.getRuntime().freeMemory()/1024/1024);
    }
}
